package cn.qzzg.demo.service.impl;

import cn.qzzg.demo.dao.NewsMapper;
import cn.qzzg.demo.model.News;
import cn.qzzg.demo.service.HelloService;
import com.alibaba.fastjson.JSONArray;
import org.apache.dubbo.config.annotation.DubboService;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Description: 实现服务接口
 * @Author: kejc
 * @CreateTime: 2025-01-10 15:52
 **/
@DubboService
public class HelloServiceImpl implements HelloService {

    @Resource
    NewsMapper newsMapper;
    @Override
    public String sayHello(String name) {
        return "Hello, " + name;
    }
    @Override
    public List<News> list() {
        List<News>  list = newsMapper.list();
        return list;
    }
}
